package com.cat.test.test01;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 曲大人的喵
 * @description
 * @create 2025/10/24 19:31
 * @since JDK17
 */


public class Solution02 {
    interface Fa {
        Fb op(List<Integer> a);
    }

    interface Fb {
        Fc op(List<Integer> b);
    }

    interface Fc {
        List<Integer> op(List<Integer> c);
    }

    static Fb step1() {
        List<Integer> x = List.of(1, 2, 3);
        Fa fa = a -> b -> c -> {    // 制定好流程
            ArrayList<Integer> list = new ArrayList<>();
            list.addAll(a);
            list.addAll(b);
            list.addAll(c);
            return list;
        };
        return fa.op(x);    // Fb
    }

    static Fc step2(Fb fb) {
        List<Integer> y = List.of(4, 5, 6);
        return fb.op(y);
    }
    static void step3(Fc fc) {
        List<Integer> z = List.of(7, 8, 9);
        List<Integer> result = fc.op(z);
        System.out.println(result);
    }

    public static void main(String[] args) {
        step3(step2(step1()));

    }
}
